<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <?php
        require_once 'conn.php';
        $id = $_GET['id'];
        $row = delete($id,$con);
        if($row >= 1){
            echo '删除成功';
        }
        else{
            echo '删除失败';
        }
        header("Location: list.php");
        function delete($id,$con){
            mysqli_query($con,"delete from user where id = '$id'");
            $rows = mysqli_affected_rows($con);
            return $rows;
        }
    ?>
</body>
</html>
